package com.tedu.egweibo2.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;

@Data
public class UserRegDTO {
    @ApiModelProperty(value = "昵称",required = true,example = "小张")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{1,30}$",message = "昵称只能是中文、英文、数字或下划线,长度在1-30位之间")
    private String nickname;
    @ApiModelProperty(value = "密码",required = true,example = "123888")
    @Pattern(regexp = "^[a-zA-Z0-9_]{6,30}$",message = "密码只能是英文数字或下划线，长度在6-30位之间")
    private String password;
    @ApiModelProperty(value = "用户名",required = true,example = "张小米")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{1,30}$",message = "用户名只能是中文、英文、数字或下划线,长度在1-30位之间")
    private String username;
}
